Recently viewed products

This endpoint can be used to retrieve the last viewed products within a session. This data is not available within the Twig data. You will therefore need to fetch and display it on your shop using JavaScript.

1[DOMEIN]/recently-viewed.json

Je krijgt als response een array met de product data als objecten.

JavaScript example

Within the template, you can retrieve this as follows. The example logs the response to the console.

1$.ajax({
2    url: "https://template.afosto.com/recently-viewed.json",
3    success: function(result){
4        console.log(result);
5    },
6})
On this page